package com.zzq.guli.service.base.config;

import com.zzq.guli.service.base.intercepter.MyIntercepter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;




//@Component
public class MyConfig implements WebMvcConfigurer {


    @Autowired
    MyIntercepter myIntercepter;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        System.out.println("这是HI1拦截器");
       registry.addInterceptor(myIntercepter).addPathPatterns("/**").excludePathPatterns("/login");
    }
}
